package com.rustic.server.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.rustic.server.po.NationalityDictionary;
import com.rustic.server.query.NationalityDictionaryAdminListQuery;
import com.rustic.server.vo.list.NationalityDictionaryAdminListVO;
import com.rustic.server.vo.list.NationalityDictionaryWebListVO;

import java.util.List;
import java.util.Map;

/**
 * 表[nationality_dictionary]对应的服务类
 *
 * @author auto
 */

public interface NationalityDictionaryService extends IService<NationalityDictionary> {

    String NATIONALITY_DICTIONARY_NOT_EXIST = "国籍字典不存在";

    /**
     * 查询（根据ID 批量查询）
     *
     * @param idList id列表
     * @return 国籍字典列表
     */
    List<NationalityDictionary> listByIdIn(List<Integer> idList);

    /**
     * 查询（根据ID 批量查询）并转换成Map
     *
     * @param idList id列表
     * @return 国籍字典列表
     */
    Map<Integer, NationalityDictionary> mapByIdIn(List<Integer> idList);

    /**
     * 管理列表查询条件
     *
     * @param query 查询参数
     * @return 查询条件
     */
    LambdaQueryWrapper<NationalityDictionary> toAdminListWrapper(NationalityDictionaryAdminListQuery query);

    /**
     * toAdminListVo
     *
     * @param nationalityDictionaryList nationalityDictionaryList
     * @return AdminListVO
     */
    List<NationalityDictionaryAdminListVO> toAdminListVo(List<NationalityDictionary> nationalityDictionaryList);

    /**
     * toWebListVo
     *
     * @param nationalityDictionaryList nationalityDictionaryList
     * @return WebListVo
     */
    List<NationalityDictionaryWebListVO> toWebListVo(List<NationalityDictionary> nationalityDictionaryList);
}
